package com.gopay.common.domain.fund;

import com.gopay.common.domain.BaseEntity;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;


 /**
 * @author baiyunpeng
 * @2016年7月14日 下午3:36:05  www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "FUND_GOPAY_FILE")
public class FundGopayFileEntity extends BaseEntity {
    private String keyId;
    private String fileName;
    private String fileType;
    private String filePath;
    private Integer totalSum;
    private BigDecimal totalAmount;
    private String fileStatus;
    private String reconciliationStatus;
    private String settleStatus;
    private Date settleTime;
    private Date reconciliationTime;
    private String memo;
    private String source;
    private Date createdTs;
    private Date lastUpdTs;
    private Integer version;

    private String isNotify;

    private String custId;

    @Id
    @GenericGenerator(name="systemUUID",strategy="uuid")
    @GeneratedValue(generator="systemUUID")
    @Column(name = "KEY_ID", insertable = true, updatable = true, nullable = false)
    public String getKeyId() {
        return keyId;
    }

    public void setKeyId(String keyId) {
        this.keyId = keyId;
    }

    @Basic
    @Column(name = "FILE_NAME",length = 64)
    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    @Basic
    @Column(name = "FILE_TYPE",length = 30)
    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    @Basic
    @Column(name = "FILE_PATH",length = 60)
    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    @Basic
    @Column(name = "TOTAL_SUM",length = 17)
    public Integer getTotalSum() {
        return totalSum;
    }

    public void setTotalSum(Integer totalSum) {
        this.totalSum = totalSum;
    }

    @Basic
    @Column(name = "TOTAL_AMOUNT",length = 17)
    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    @Basic
    @Column(name = "FILE_STATUS",length = 2)
    public String getFileStatus() {
        return fileStatus;
    }

    public void setFileStatus(String fileStatus) {
        this.fileStatus = fileStatus;
    }

    @Basic
    @Column(name = "RECONCILIATION_STATUS",length = 2)
    public String getReconciliationStatus() {
        return reconciliationStatus;
    }

    public void setReconciliationStatus(String reconciliationStatus) {
        this.reconciliationStatus = reconciliationStatus;
    }

    @Basic
    @Column(name = "SETTLE_STATUS",length = 1)
    public String getSettleStatus() {
        return settleStatus;
    }

    public void setSettleStatus(String settleStatus) {
        this.settleStatus = settleStatus;
    }

    @Basic
    @Column(name = "SETTLE_TIME",length = 200)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getSettleTime() {
        return settleTime;
    }

    public void setSettleTime(Date settleTime) {
        this.settleTime = settleTime;
    }

    @Basic
    @Column(name = "RECONCILIATION_TIME",length = 200)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getReconciliationTime() {
        return reconciliationTime;
    }

    public void setReconciliationTime(Date reconciliationTime) {
        this.reconciliationTime = reconciliationTime;
    }

    @Basic
    @Column(name = "MEMO",length = 32)
    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    @Basic
    @Column(name = "SOURCE",length = 1)
    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    @Basic
    @Column(name = "CREATED_TS",length = 200)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Basic
    @Column(name = "LAST_UPD_TS",length = 200)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

     @Version
     @Column(name = "VERSION", nullable = false, precision = 22, scale = 0)
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Basic
    @Column(name = "IS_NOTIFY",length = 1)
    public String getIsNotify() {
        return isNotify;
    }

    public void setIsNotify(String isNotify) {
        this.isNotify = isNotify;
    }

    @Basic
    @Column(name = "CUST_ID",length = 32)
    public String getCustId() {
        return custId;
    }

    public void setCustId(String custId) {
        this.custId = custId;
    }

    @Override
    public String toString() {
        return "FundGopayFileEntity{" +
                "keyId='" + keyId + '\'' +
                ", fileName='" + fileName + '\'' +
                ", fileType='" + fileType + '\'' +
                ", filePath='" + filePath + '\'' +
                ", totalSum=" + totalSum +
                ", totalAmount=" + totalAmount +
                ", fileStatus='" + fileStatus + '\'' +
                ", reconciliationStatus='" + reconciliationStatus + '\'' +
                ", settleStatus='" + settleStatus + '\'' +
                ", settleTime=" + settleTime +
                ", reconciliationTime=" + reconciliationTime +
                ", memo='" + memo + '\'' +
                ", source='" + source + '\'' +
                ", createdTs=" + createdTs +
                ", lastUpdTs=" + lastUpdTs +
                ", version=" + version +
                ", isNotify=" + isNotify +
                ", custId=" + custId +
                '}';
    }



    public FundGopayFileEntity setterBean(FundGopayFileEntity fileEntity,String FileName, String FileType, String FilePath, int totalSum, BigDecimal totalMoney,String fileStates,Date stalTime,
                                  Date reconciliationTime,String memo,String source, Date createTime,Date lastTime,String settleStatus) {

        fileEntity.setFileName(FileName);
        fileEntity.setFileType(FileType);
        fileEntity.setFilePath(FilePath);
        fileEntity.setTotalSum(totalSum);
        fileEntity.setTotalAmount(totalMoney);
        fileEntity.setFileStatus(fileStates);
        fileEntity.setSettleTime(stalTime);
        fileEntity.setReconciliationTime(reconciliationTime);
        fileEntity.setMemo(memo);
        fileEntity.setSource(source);
        fileEntity.setCreatedTs(createTime);
        fileEntity.setLastUpdTs(lastTime);
        fileEntity.setSettleStatus(settleStatus);
        fileEntity.setIsNotify("0");//默认是未通知

        return fileEntity;
    }

}
